package rmhc.server
{
	import flash.utils.ByteArray;

	public class MultipartEntry
	{
		protected const rn:String = "\r\n";
		
		public var name:String;
		protected var value:String;
		
		public function MultipartEntry( name:String , value:String )
		{
			this.name = name;
			this.value = value;
		}
		
		public function appendTo( ba:ByteArray , boundary:String ):void
		{
			ba.writeUTFBytes( "--" + boundary + rn );
			ba.writeUTFBytes( 'Content-Disposition: form-data; name="' + name + '"' + rn + rn );
			ba.writeUTFBytes( value + rn );
		}
	}
}